package com.itheima.wallet.controller;


import com.itheima.wallet.api.AccountServiceApi;
import com.itheima.wallet.model.Account;
import com.itheima.wallet.result.Result;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("wallet")
public class WalletController {

    @Reference(version = "1.0.0")
    AccountServiceApi accountServiceApi;

 /*   @PostMapping("/add")
    public Result createAccount(@RequestBody Account account){
        boolean b = accountServiceApi.addAccount(account);
       return new Result(true,"添加账户成功",null);
    }*/

    @GetMapping("/delete/{id}")
    public Result delete(@PathVariable Long id){
        //boolean b = accountServiceApi.addAccount(account);
        String accountInfo = accountServiceApi.getAccountInfo(id);
        System.out.println(accountInfo);
        return new Result(true,"删除账户成功",null);
    }





}
